%% vim: ts=4 sw=4 et ft=erlang
[
    {simple_bridge, [

        {handler, nitrogen},
        %% the name of the simple_bridge handler module, which should not
        %% change unless you're doing something custom to set up the context
        %% and simple_bridge, and also to interact with the request in a
        %% non-standard way. Generally speaking, it's not recommended to change
        %% this unless you really know what you are doing.

        {backend, inets}, 
        %% cowboy | inets | mochiweb | webmachine | yaws

        {address, "0.0.0.0"},       
        %% IP address to bind, either in tuple format or string

        {port, 8000},               
        %% Port to bind

        {document_root, "./site/static"}, 
        %% The path on the local machine to handle static files

        {static_paths, ["js/", "css/", "images/", "nitrogen/", "favicon.ico"]},
        %% The list of paths to be automatically translated to static paths by simple_bridge


        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        %% FILE UPLOAD SETTINGS
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

        {max_post_size, 10},
        %% No multipart request greater than above will be accepted. Units are
        %% MB
        
        {max_file_size, 10},
        %% No single uploaded file will be accepted greater than the above.
        %% Units are MB.

        {max_file_in_memory_size,  0},
        %% If a file is less than the above, then instead of writing the file
        %% to disk, it'll be retained in memory and can be retrieved by
        %% sb_uploaded_file:data/1. See the README for more info.

        {scratch_dir, "./scratch"}
        %% This is the location of the temp directory where uploaded files will
        %% be placed.

        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        %% inets-SPECIFIC DISPATCH TABLES:
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

        %% {webmachine_dispatch, DispatchTable},
        %% Webmachine dispatch table override (ignores static_paths above)

        %% {webmachine_dispatch_function, {Module, Function}}
        %% A Module:Function() that when evaluated will return a dispatch table
        %% for Webmachine, again ignores the static_paths above

        %% {cowboy_dispatch, DispatchTable}
        %% Cowboy dispatch table override (ignores static_paths)

        %% {cowboy_dispatch_function, {Module, Function}}
        %% A Module:Function() that when evaluated will return a dispatch tavle
        %% for Cowboy, again ignoring the static_paths above

    ]}
].

